package com.bookshop.mapper;

import com.bookshop.entity.Collect;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * ClassName: CollectMapper
 * Package: com.bookshop.mapper
 * Description:
 *
 * @Author BJX
 * @Create 2024/1/22 2:35
 * @Version 1.0
 */
@Mapper
public interface CollectMapper {
    int searchBookInCollect(@Param("bookId") long bookId, @Param("userId") long userId);

    int addCollect(@Param("bookId") long bookId, @Param("userId") long userId);

    int cancelCollect(@Param("bookId") long bookId, @Param("userId") long userId);

    int countCollect(@Param("userId") long userId);

    int clearCollect(@Param("userId") long userId);

    List<Collect> showCollect(@Param("userId") long userId);
}
